package wendyeq.iweb.blog.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import wendyeq.iweb.blog.dao.IArchiveDAO;
import wendyeq.iweb.blog.pojo.Archive;
import wendyeq.iweb.blog.service.IArchiveService;

@Service("archiveServiceImpl")
public class ArchiveServiceImpl implements IArchiveService {
	Logger logger = Logger.getLogger(ArchiveServiceImpl.class);
	@Resource(name="archiveDAO")
	private IArchiveDAO archiveDAO;
	
	@Override
	public boolean save(Archive entity) {
		// TODO Auto-generated method stub
		return archiveDAO.saveOrUpdate(entity);
	}

	//didn't use
	@Override
	public boolean delete(String id) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public Archive findById(String id) {
		// TODO Auto-generated method stub
		return archiveDAO.findById(id);
	}

	@Override
	public List<Archive> findByPage(int min, int max) {
		// TODO Auto-generated method stub
		return archiveDAO.findByPage(min,max);
	}

	@Override
	public List<Archive> findAll() {
		// TODO Auto-generated method stub
		return archiveDAO.findAll();
	}

}
